<template>
    <div class="index">
        <!-- 轮播图 -->
        <mt-swipe :auto="2000" prevent='true'>
            <mt-swipe-item>
                <a href="javascript:;">
                    <img src="../assets/images/banner1.png" alt="">
                </a>
            </mt-swipe-item>
            <mt-swipe-item>
                <a href="javascript:;">
                    <img src="../assets/images/banner2.png" alt="">
                </a>
            </mt-swipe-item>
            <mt-swipe-item>
                <a href="javascript:;">
                    <img src="../assets/images/banner3.png" alt="">
                </a>
            </mt-swipe-item>
            <mt-swipe-item>
                <a href="javascript:;">
                    <img src="../assets/images/banner4.png" alt="">
                </a>
            </mt-swipe-item>
            <mt-swipe-item>
                <a href="javascript:;">
                    <img src="../assets/images/banner5.png" alt="">
                </a>
            </mt-swipe-item>
            <mt-swipe-item>
                <a href="javascript:;">
                    <img src="../assets/images/banner6.png" alt="">
                </a>
            </mt-swipe-item>
            <mt-swipe-item>
                <a href="javascript:;">
                    <img src="../assets/images/banner7.png" alt="">
                </a>
            </mt-swipe-item>
            <mt-swipe-item>
                <a href="javascript:;">
                    <img src="../assets/images/banner8.png" alt="">
                </a>
            </mt-swipe-item>
            <mt-swipe-item>
                <a href="javascript:;">
                    <img src="../assets/images/banner9.png" alt="">
                </a>
            </mt-swipe-item>
        </mt-swipe>
        <!-- nav 导航部分 -->
        <div class="nav clearfix">
            <a href="javascript:;"><img src="../assets/images/nav1.png" alt=""></a>
            <a href="javascript:;"><img src="../assets/images/nav2.png" alt=""></a>
            <a href="javascript:;"><img src="../assets/images/nav3.png" alt=""></a>
            <a href="javascript:;"><img src="../assets/images/nav4.png" alt=""></a>
            <a href="javascript:;"><img src="../assets/images/nav5.png" alt=""></a>
            <a href="javascript:;"><img src="../assets/images/nav2.png" alt=""></a>
        </div>
        <!-- 商品 -->
        <ul>
            <li>
                <a href="javascript:;">
                    <img src="../assets/images/product.jpg" alt="">
                    <p>商品商品商品商品商品商品商品商品商品商品商品商品商品商品商品商品商品</p>
                    <div class="price">
                        <span>&yen;500.00</span>
                        <del>&yen;600.00</del>
                    </div>
                    <mt-button type="primary">立即购买</mt-button>
                </a>
            </li>
            <li>
                <a href="javascript:;">
                    <img src="../assets/images/product.jpg" alt="">
                    <p>商品商品商品商品商品商品商品商品商品商品商品商品商品商品商品商品商品</p>
                    <div class="price">
                        <span>&yen;500.00</span>
                        <del>&yen;600.00</del>
                    </div>
                    <mt-button type="primary">立即购买</mt-button>
                </a>
            </li>
            <li>
                <a href="javascript:;">
                    <img src="../assets/images/product.jpg" alt="">
                    <p>商品商品商品商品商品商品商品商品商品商品商品商品商品商品商品商品商品</p>
                    <div class="price">
                        <span>&yen;500.00</span>
                        <del>&yen;600.00</del>
                    </div>
                    <mt-button type="primary">立即购买</mt-button>
                </a>
            </li>
            <li>
                <a href="javascript:;">
                    <img src="../assets/images/product.jpg" alt="">
                    <p>商品商品商品商品商品商品商品商品商品商品商品商品商品商品商品商品商品</p>
                    <div class="price">
                        <span>&yen;500.00</span>
                        <del>&yen;600.00</del>
                    </div>
                    <mt-button type="primary">立即购买</mt-button>
                </a>
            </li>
        </ul>
    </div>
</template>
<script>
export default {
  data () {
    return {

    }
  },
  created () {
    this.$store.state.title = '乐淘商城购物'
  }
}
</script>
<style lang="scss" scoped>
.index {
    height: auto;
    //轮播图
    .mint-swipe {

        height: 235px;
        img {
            width: 100%;
            height: 100%;
        }
    }
    // nav导航部分
    .nav {
        width: 100%;
        padding: 10px;
        box-sizing: border-box;
        display: flex;
        flex-wrap: wrap;
        a {
        width: 33.33%;
        float: left;
            img {
                width: 100%;
                //去除3px的间距
                display: block;
            }
        }
    }
    // 商品部分
    ul {
        padding: 10px;
        width: 100%;
        li {
            width: 49%;
            border: 1px solid #ddd;
            box-shadow: 0px 0px 2px #ccc;
            float: left;
            margin-bottom: 10px;
            img {
                width: 100%;
                display: block;
            }
            p {
                font-size: 14px;
                padding: 0px 10px;
                color:#666;
                display: -webkit-box;
                overflow: hidden;
                white-space: normal !important;
                text-overflow: ellipsis;
                word-wrap: break-word;
                -webkit-line-clamp: 2;
                -webkit-box-orient: vertical;
                line-height: 18px;
            }
            .price {
                text-align: center;
                font-size: 14px;
                padding-top: 5px;
                span{
                    color:#e92322;
                }
                del {
                    color: #888;
                    font-size: 13px;
                }
            }

            button {
                display: block;
                margin: 10px auto;
            }
        }
    li:nth-child(2n){
        margin-left: 8px;
    }
    }
}

</style>
